package com.bjpowernode.p2p.mapper.loan;

import com.bjpowernode.p2p.model.loan.LoanInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface LoanInfoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(LoanInfo record);

    int insertSelective(LoanInfo record);

    LoanInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(LoanInfo record);

    int updateByPrimaryKey(LoanInfo record);

    Double selectHistoryAvgRate();

    List<LoanInfo> selectLoanInfo(Integer pType);

    Integer selectTotalRowsByPtype(Integer pType);

    List<LoanInfo> selectCurrentPageData(@Param("pType") Integer pType, @Param("pageSize") Integer pageSize, @Param("indexLimit") int indexLimit);

    LoanInfo selectLoanInfoByTypeAndId(String ptype, String id);

    int updateLoanInfoAvarialeMonry(Map<String, Object> paramMap);
}